/*
 * @Author: your name
 * @Date: 2022-08-11 11:48:59
 * @LastEditTime: 2023-08-24 09:18:09
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \app-customized\src\router\index.js
 */
import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);
/**
 * 编写路径 必须写清楚路由注释目的
 */
const routes = [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../pages/home/index.vue')// 首页
    },
    {
      path: '/login',
      name: 'login1',
      component: () => import('../pages/login1/index.vue')// 首页
    },
    {
      path: '/bookVersoin',
      name: 'bookVersoin',
      component: () => import('../pages/bookVersoin/index.vue')// 课本选择页面
    },
    {
      path: '/gradeChange',
      name: 'gradeChange',
      component: () => import('../pages/gradeChange/index.vue')// 年级选择
    },
    {
      path: '/remind',
      name: 'remind',
      component: () => import('../pages/remind/index.vue') // 提示页面
    },
    {
      path: '/information',
      name: 'information',
      component: () => import('../pages/information/index.vue') // 消息页面
    },
    {
      path: '/notification',
      name: 'notification',
      component: () => import('../pages/notification/index.vue') // 通知页面
    },
    {
      path: '/layOut',
      name: 'layOut',
      component: () => import('../pages/layOut/index.vue'), // 课本选择页面
      children: [
        {
          path: '/layOut/Mine',
          name: 'mine',
          component: () => import('../pages/user/index.vue')// 课本选择页面
        },
        {
          path: '/layOut/Message',
          name: 'messagePage',
          component: () => import('../pages/messagePage/index.vue')// 课本选择页面
        }
      ]
    },
    {
      path: '/secondPage',
      name: 'secondPage',
      component: () => import('../pages/secondPage/index.vue') // 二级自定义页面
    }
  ],
  router = new VueRouter({
    mode: 'history',
    // 强制使用history模式
    fallback: false,
    base: process.env.BASE_URL,
    routes
  });

export default router;
